package controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import service.HelloService;

@Controller
public class HelloController {
	@Autowired
	private HelloService helloService;
	
	@RequestMapping("hello")
	public String index(Model model){
		model.addAttribute("hi", helloService.sayHello("abel"));
		return "index";
	}
}
